/*
 * @Description: 备份
 * @Author: Zzt
 * @Date: 2022-08-05 10:24:16
 * @LastEditTime: 2022-08-18 13:52:49
 */
import { lazy } from 'react';
import Layout from '@/layout';
import lazyLoad from '../components/lazyLoad';

export const BackupPlan = lazy(
  () =>
    import(/* webpackChunkName: "Accession" */ '@/view/backupAndResume/BackupPlan/BackupPlanMain')
);
export const BackupList = lazy(
  () => import(/* webpackChunkName: "Accession" */ '@/view/backupAndResume/ListLIst/BackupList')
);
export const OfflineBackup = lazy(
  () =>
    import(
      /* webpackChunkName: "Accession" */ '@/view/backupAndResume/OfflineBackup/OfflineBackupMain'
    )
);
export const RestoreRecord = lazy(
  () =>
    import(/* webpackChunkName: "Accession" */ '@/view/backupAndResume/RestoreRecords/RestoreMain')
);

const backupAndResumeRoutes: any[] = [
  {
    path: '/backupAndResume',
    element: <Layout />,
    meta: {
      title: '备份与恢复'
    },
    children: [
      {
        path: 'BackupPlan',
        element: lazyLoad(BackupPlan),
        meta: {
          title: '备份计划'
        }
      },
      {
        path: 'backupList',
        element: lazyLoad(BackupList),
        hidden: true,
        meta: {
          title: '备份清单'
        }
      },
      {
        path: 'offlineBackup',
        element: lazyLoad(OfflineBackup),
        // hidden: true,
        meta: {
          title: '离线备份管理'
        }
      },
      {
        path: 'restoreRecord',
        element: lazyLoad(RestoreRecord),
        // hidden: true,
        meta: {
          title: '恢复记录'
        }
      }
    ]
  }
];

export default backupAndResumeRoutes;
